import { stringify } from 'qs';
import request from '@/utils/request';

/**
 * 查询场馆列表-分页
 * @param {*} params 
 */
export async function queryShop(params) {
  return request('/venueInfo/list', {
    method: 'POST',
    data: {
      ...params
    },
  });
}

/**
 * 查询场馆详情
 * @param {*} params 
 */
export async function fetchShop(params) {
  return request('/venueInfo/queryVenueInfoById', {
    method: 'POST',
    requestType:'form',
    data: {
      ...params
    },
  });
}

/**
 * 根据ID删除场馆
 * @param {*} params 
 */
export async function removeShop(params) {
  return request(`/venueInfo/delete?${stringify(params)}`);
}

/**
 * 批量删除
 * @param {*} params 
 */
// export async function batchRemoveShop(params) {
//   return request(`/venueInfo/batchDeleteVenueInfoByIds?${stringify(params, { arrayFormat: 'repeat' })}`);
// }

/**
 * 批量删除
 * @param {*} params 
 */
export async function batchRemoveShop(params) {
  return request('/venueInfo/batchDeleteVenueInfoByIds', {
    method: 'POST',
    data: params,
  });
}
/**
 * 新增场馆
 * @param {*} params 
 */
export async function addShop(params) {
  return request('/venueInfo/save', {
    method: 'POST',
    data: { ...params },
  });
}

/**
 * 根据ID编辑场馆
 * @param {*} params 
 */
export async function updateShop(params) {
  return request('/venueInfo/update', {
    method: 'POST',
    data: { ...params },
  });
}

/**
 * 获取大屏图片及二维码
 * @param {*} params 场馆ID
 * @returns 
 */
 export async function getScrollInfo(params) {
  return request('/scroll/getScrollInfo', {
    method: 'POST',
    data: {
      ...params
    },
  });
}
/**
 * 删除大屏图片
 * @param {*} params 
 * @returns 
 */
export async function deleteManyImg(params) {
  return request('/file/deleteManyImg', {
    method: 'POST',
    data: {
      ...params
    },
  });
}

/**
 * 重新生成二维码图片
 * @param {*} params 
 * @returns 
 */
export async function preContractQRCode(params) {
  return request('/file/preContractQRCode', {
    method: 'POST',
    data: params
  });
}

/**
 * 上传大屏图片
 * @param {*} params 
 * @returns 
 */
export async function uploadManyImg(params) {
  return request('/file/uploadManyImg', {
    method: 'POST',
    data: params,
  });
}